This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Also fetch LAVA job definition for watchjobs #1123
Merged
chaws
merged 5 commits into
Linaro:master
from
swvanbuuren:swvanbuuren/watchjob-job-definition
Mar 5, 2024
Merged
Also fetch LAVA job definition for watchjobs #1123
chaws
merged 5 commits into
Linaro:master
from
swvanbuuren:swvanbuuren/watchjob-job-definition
Mar 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently, the LAVA job definition is only fetched if the LAVA job is submitted directly through SQUAD (i.e. using a submitjob). This commit also implements this functionality for watchjobs. Signed-off-by: Sietze van Buuren <[email protected]>
LGTM |
chaws
approved these changes
Feb 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
chaws
reviewed
Feb 6, 2024
chaws
reviewed
Feb 6, 2024
chaws
reviewed
Feb 6, 2024
Tests are failing because the testing backend is missing diff --git a/squad/ci/backend/fake.py b/squad/ci/backend/fake.py
index e49556bb..4b3100e2 100644
--- a/squad/ci/backend/fake.py
+++ b/squad/ci/backend/fake.py
@@ -66,5 +66,8 @@ class Backend(object):
def check_job_definition(self, definition):
return True
+ def get_job_definition(self, test_job):
+ return "sample job definition"
+
def supports_callbacks(self):
return False
diff --git a/test/api/test_ci.py b/test/api/test_ci.py
index 6ee36946..ba19fce3 100644
--- a/test/api/test_ci.py
+++ b/test/api/test_ci.py
@@ -238,6 +238,8 @@ class CiApiTest(TestCase):
1,
testjob_queryset.count()
)
+ testjob = testjob_queryset.first()
+ self.assertTrue(len(testjob.definition) > 0)
fetch.assert_called_with(testjob_queryset.first().id)
logentry_queryset = LogEntry.objects.filter(
user_id=self.project_privileged_user.pk, |
Signed-off-by: Sietze van Buuren <[email protected]>
- E.g. Tuxsuite does not have the concept of job definitions Signed-off-by: Sietze van Buuren <[email protected]>
Signed-off-by: Sietze van Buuren <[email protected]>
Thank you for this. I have taken over your suggestion in commit f81c12f. Tests seem to have passed. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the LAVA job definition is only fetched if the LAVA job is submitted directly through SQUAD (i.e. using a submitjob). This commit also implements this functionality for watchjobs.